/**
 * @Author: 焦质晔
 * @Date: 2020/2/26
 * @Last Modified by:   小马
 * @Last Modified time: 2020-02-26 15:45:00
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 品牌 - 下拉框
export const getPinpSelect = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/BasicParametersAfterSales/queryById/brandsqueryall`, {
    params
  });

// 车系 - 下拉框
export const getChexSelect = (brandsid, params) =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/BasicParametersAfterSales/queryById/brandsdict/${brandsid}/seriessdict`, {
    params
  });

// 车型 - 下拉框
export const getCheModelSelect = (brandsid, seriessid, params) =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/BasicParametersAfterSales/queryById/brandsdict/${brandsid}/seriessdict/${seriessid}/modelsdict`, {
    params
  });

/**
 * @description: 根据车系i获取车系下车型
 * @param { String seriesId }
 * @return {*}
 * @author: 何兴家
 */
export const queryModelBySeriesId = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/order/repairOrder/queryModelBySeriesId`, {
    params
  });
// 配置 - 下拉框
export const getPackageSelect = (brandsid, seriessid, modelid, params) =>
  axios.get(`${SERVER.BASEDATA}/vehicleProduct/brandsdict/${brandsid}/seriessdictAll/${seriessid}/modelsdictAll/${modelid}/packagedictAll`, {
    params
  });

// 选装 - 下拉框
export const getOptionSelect = (brandsid, seriessid, modelid, packageid, params) =>
  axios.get(`${SERVER.BASEDATA}/vehicleProduct/brandsdict/${brandsid}/seriessdictAll/${seriessid}/modelsdictAll/${modelid}/packagedictAll/${packageid}/optiondictAll`, {
    params
  });
// 内饰色 - 下拉框
export const getInteriorSelect = params =>
  axios.get(`${SERVER.BASEDATA}/vehicleProduct/colors/colorinfo/Interior`, {
    params
  });
// 外饰色 - 下拉框
export const getExteriorSelect = params =>
  axios.get(`${SERVER.BASEDATA}/vehicleProduct/colors/colorinfo/exterior`, {
    params
  });

//  table车系
export const getChexSelectTable = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/baseData/basicData/camel/series`, {
    params
  });
//  table车型
export const getCheModelSelectTable = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/baseData/basicData/camel/model`, {
    params
  });
